package com.lyh.educationtrain;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import com.lyh.educationtrain.SpringEducationTrainApplication;

/**
 * SpringBootServletInitializer这个类的作用与在web.xml中配置负责初始化Spring应用上下文的监听器作用类似，
 * 只不过在这里不需要编写额外的XML文件了
 *
 */
@SpringBootApplication
public class SpringEducationTrainApplication extends SpringBootServletInitializer {
	public static void main(String[] args) {
		SpringApplication.run(SpringEducationTrainApplication.class, args);
	}

	// 使用外部tomcat容器 哈哈哈1111111
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(SpringEducationTrainApplication.class);
	}
	
}
